﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/RegularAdmin.Master" CodeBehind="SearchDepartmentOrganization.aspx.vb"  Inherits="SATS.SearchDepartmentOrganization" %>
<asp:Content ID="WarningContent" ContentPlaceHolderID="WarningContent" runat="server">
    <asp:ValidationSummary ID="ValidationSummary" runat="server" />
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row-fluid">
        <div class="span12">
            <h2 class="style5">Search Departments and Organizations</h2>
            <hr />
        </div>
    </div>
    <div class="row-fluid">
        <div class="span12">
            <asp:Label ID="lblSearch0" runat="server" Text="Search by Department:"></asp:Label>
            <br />
            <asp:DropDownList ID="ddDepartments" runat="server" AutoPostBack="True">
            </asp:DropDownList>
            <br />
            <asp:Label ID="lblSearch" runat="server" Text="Search by Organization:"></asp:Label>
            <br />
            <asp:TextBox ID="txtOrganization" runat="server"></asp:TextBox>
            <br />
            <p>
                <asp:Button ID="btnSearch" runat="server" Text="Search" Width="152px" BackColor="#990000" ForeColor="#FFFFCC" />
                <br />
                - or -
                <br />
                <asp:Button ID="btnAll" runat="server" Text="Show All" Width="152px" BackColor="#990000" ForeColor="#FFFFCC" />
            </p>
            <asp:Label ID="lblSuccess" runat="server" Font-Size="Large" ForeColor="#3399FF"></asp:Label>
        </div>
    </div>

    <div class="row-fluid">
        <div class="span12">
            <center>
            <asp:GridView ID="gvOrganizationsList" runat="server" AutoGenerateColumns="False" DataKeyNames="organizationID"
                CellPadding="4" ForeColor="#333333" GridLines="None" Width="880px"
                Style="text-align: center">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField HeaderText="Organization Name" DataField="OrganizationName" />
                    <asp:BoundField HeaderText="Department Name" DataField="departmentID" />
                    <asp:BoundField HeaderText="Established Term" DataField="establishedTerm" />
                    <asp:BoundField DataField="organizationStatus" HeaderText="Organization Status" />
                    <asp:CommandField DeleteText="Remove Organization" ShowDeleteButton="True" />
                </Columns>
                <EmptyDataTemplate>
                </EmptyDataTemplate>
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                <SortedAscendingCellStyle BackColor="#FDF5AC" />
                <SortedAscendingHeaderStyle BackColor="#4D0000" />
                <SortedDescendingCellStyle BackColor="#FCF6C0" />
                <SortedDescendingHeaderStyle BackColor="#820000" />
            </asp:GridView>
            </center>
        </div>
    </div>

    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic"
        ControlToValidate="txtOrganization"
        ErrorMessage="Search Organization by text only"
       ValidationExpression="^[a-zA-Z ]*$" />
</asp:Content>

<asp:Content ContentPlaceHolderID="Instructions" ID="instructions" runat="server">
    <ul>
        <li>Do not delete the "N/A" Department and Organization</li>
    </ul>
</asp:Content>